-- GENERATED SPELL FOR [Ebon Blade Defender] --


function spell0_31250(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(59130,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31250', 611, 1)
end

function spell1_31250(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(59134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31250', 601, 1)
end

function spell2_31250(pUnit, Event) --@Death Grip,n/a--
pUnit:FullCastSpellOnTarget(49576,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31250', 0, 1)
end

function spell3_31250(pUnit, Event) --@Icy Touch,n/a--
pUnit:FullCastSpellOnTarget(59131,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31250', 20000, 1)
end

function spell4_31250(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(59133,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31250', 12000, 1)
end

function Sorts_31250(pUnit, Event)
local choix_sorts_31250 = math.random(0, 4)
if choix_sorts_31250 == 0 then
pUnit:RegisterEvent('spell0_31250', 1, 1)
end
if choix_sorts_31250 == 1 then
pUnit:RegisterEvent('spell1_31250', 1, 1)
end
if choix_sorts_31250 == 2 then
pUnit:RegisterEvent('spell2_31250', 1, 1)
end
if choix_sorts_31250 == 3 then
pUnit:RegisterEvent('spell3_31250', 1, 1)
end
if choix_sorts_31250 == 4 then
pUnit:RegisterEvent('spell4_31250', 1, 1)
end
end

function mob31250_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31250', math.random(1500, 3000), 1)
end

function mob31250_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31250_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31250_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31250, 1, 'mob31250_Action')
RegisterUnitEvent(31250, 2, 'mob31250_Leave')
RegisterUnitEvent(31250, 3, 'mob31250_Kill')
RegisterUnitEvent(31250, 4, 'mob31250_Die')
